<template>
  <footer :class="{ 'home-page-style': isCurrentRoute('/') }">
    <p>&copy; 2023 XAUAT iOS Club. All rights reserved. | 备案号：陕ICP备114514号</p>
    <div class="container">
      <el-row>
        <el-col :span="8">
          <div>友情链接</div>
        </el-col>
        <el-col :span="8">
          <a href="https://cn.xauat.edu.cn/" target="_blank">西安建筑科技大学</a>
        </el-col>
        <el-col :span="8">
          <div>广告位招租</div>
        </el-col>
      </el-row>
    </div>
  </footer>
</template>

<script>
export default {
  methods: {
    isCurrentRoute(routePath) {
      // 使用 $route.path 判断是否与指定路由地址相等
      return this.$route.path === routePath;
    }
  }
};
</script>

<style scoped>
footer {
  padding-top: 10px;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  background-color: #f5f5f5;

  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.container {
  padding-bottom: 10px;
}

.home-page-style {
  scroll-snap-align: start;
}
</style>
  